package com.xmotor.testjavaxvalidation.controller;

import com.xmotor.testjavaxvalidation.vo.R;

public class BaseController {
    protected R ok(){
        return new R(0,null,null);
    }
    protected R ok(String msg){
        return new R(0,msg,null);
    }
    protected <T>R<T> ok(T data){
        return new R(0,null,data);
    }
    protected R fail(String msg){
        return new R(1,msg,null);
    }
    protected R fail(int code, String msg){
        return new R(code,msg,null);
    }
}
